const routes = [
    {
        path: '/',
        meta: {hidden: true},
        redirect: '/home',
    },
    {
        path: '/login',
        component: () => import("@/views/Login"),
        meta: {hidden: true}
    },
    {
        path: '/home',
        component: () => import("@/views/Layout"),
        meta: {hidden: false, leaf: true, title: '首页', icon: 'home-outlined'},
        children: [
            {
                path: '/home',
                meta: {},
                component: () => import("@/views/Home")
            },
        ]
    },
    <#list tables as table>
    <#if (!table.isRelationalTable)>
    {
        path: '/${table.tableName}',
        component: () => import("@/views/Layout"),
        meta: {hidden: false, leaf: true, title: '${table.menuName}', icon: 'file-outlined'},
        children: [
            {
                path: '/${table.tableName}',
                meta: {title: '${table.menuName}', icon: 'file-outlined'},
                component: () => import("@/views/${table.className}")
            },
        ]
    },
    </#if>
    </#list>
    {
        path: '/',
        component: () => import("@/views/Layout"),
        meta: {hidden: true},
        children: [
            {
                path: '/404',
                name: '页面未找到',
                meta: {},
                component: () => import("@/views/404")
            }
        ]
    },
    {
        path: '/',
        component: () => import("@/views/Layout"),
        meta: {hidden: true},
        children: [
            {
                path: '/403',
                name: '没有权限',
                meta: {},
                component: () => import("@/views/403")
            }
        ]
    },
    {
        path: '/:catchAll(.*)',
        redirect: {path: '/404'},
        meta: {hidden: true},
    }
];

export default routes;
